package work20241202_chap5oop;

/**
 * @author zdl
 * @date 2024/12/2
 */
public class Demo1 {
    public static void main(String[] args) {
        Worker w = new Worker();
        w.num = 10000;
        w.section = "技术部";
        w.age= 20;
        w.name = "张三";
        System.out.println(w.num);
        System.out.println(w.section);
        System.out.println(w.age);
        System.out.println(w.name);
        w.work();
        w.work1();
    }
}

class Worker{


    int num;
    String section;
    int age;
    String name;

    public void work(){
        System.out.println("打螺丝");
    }
    public void work1() {
        System.out.println("打灰");
    }
}
